package com.doupi.partner.dal.exception;

/**
 * 运行业务需要回滚时抛出的异常
 * 
 * @author Super Jens Wang
 *
 * @version 1.0 @ 2016年7月20日 上午4:47:54
 */
public class RollbackException extends RuntimeException {

	private static final long serialVersionUID = -1376645320861107365L;

	private String code;

	public RollbackException(String message) {
		super(message);
	}

	public RollbackException(String code, String message) {
		super(message);
		this.code = code;
	}

	public RollbackException(Throwable e) {
		super(e);
	}

	public RollbackException(String message, Throwable cause) {
		super(message, cause);
	}

	public RollbackException(String code, String message, Throwable cause) {
		this(message, cause);
		this.code = code;
	}

	/**
	 * 异常的code
	 */
	public String getCode() {
		return code;
	}
}
